{{! -------------------------------------------------------------------------- }}
{{! Copyright 2002-2016, OpenNebula Project, OpenNebula Systems                }}
{{!                                                                            }}
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may    }}
{{! not use this file except in compliance with the License. You may obtain    }}
{{! a copy of the License at                                                   }}
{{!                                                                            }}
{{! http://www.apache.org/licenses/LICENSE-2.0                                 }}
{{!                                                                            }}
{{! Unless required by applicable law or agreed to in writing, software        }}
{{! distributed under the License is distributed on an "AS IS" BASIS,          }}
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   }}
{{! See the License for the specific language governing permissions and        }}
{{! limitations under the License.                                             }}
{{! -------------------------------------------------------------------------- }}

<div id="{{dialogId}}" class="reveal large" role="dialog" data-reveal >
  <div class="row">
    <div class="large-12 columns">
      <h3 class="subheader">{{tr "Host Overcommitment"}}</h3>
    </div>
  </div>
  <div class="confirm-resources-header"></div>
  <div class="reveal-body">
    <form id="{{dialogId}}Form" action="">
      <div class="row">
        <div class="large-12 columns">
          <br/>
          <p>
            {{tr "Prior to assigning a VM to a Host, the available capacity is checked to ensure that the VM fits in the host. The capacity is obtained by the monitor probes. You may alter this behaviour by reserving an amount of capacity. You can reserve this capacity:"}}
          </p>
          <ul>
            <li>{{tr "Cluster-wise. All the hosts of the cluster will reserve the same amount of capacity."}}</li>
            <li>{{tr "Host-wise. This value will override those defined at cluster level."}}</li>
          </ul>
          <br/>
          <p>
            {{tr "These values can be negative, in that case you'll be actually increasing the overall capacity so overcommitting host capacity."}}
          </p>
        </div>
      </div>
      <div class="row">
        <div class="medium-6 columns">
          <label>
            {{tr "Reserved CPU"}}
            <input wizard_field="RESERVED_CPU" type="number"/>
          </label>
        </div>
        <div class="medium-6 columns">
          <label>
            {{tr "Reserved Memory in KB"}}
            <input wizard_field="RESERVED_MEM" type="number"/>
          </label>
        </div>
      </div>
      <div class="row">
        <div class="large-12 columns">
          <p class="label secondary radius right">
            {{tr "The values will overwrite the monitoring values in the next monitorization cycle"}}
          </p>
        </div>
      </div>
      <div class="reveal-footer">
        <div class="form_buttons">
          <button class="button radius right success" type="submit">{{tr "Update"}}</button>
        </div>
      </div>
      <button class="close-button" data-close aria-label="{{tr "Close modal"}}" type="button">
        <span aria-hidden="true">&times;</span>
      </button>
    </form>
  </div>
</div>
